package com.github.dubbo.controller;


import com.github.dubbo.service.HelloService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.rpc.cluster.loadbalance.ConsistentHashLoadBalance;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.concurrent.CompletableFuture;

@RestController
public class ConsumerController {
    @DubboReference
    private HelloService helloService;

    @GetMapping("/test")
    public String getInfo(@RequestParam("msg") String msg){
        HashMap<String, String> map = helloService.getInfo(msg);
        return map.get("msg");
    }

}
